package com.joesem.sale.client.network.data

import android.os.Parcel
import android.os.Parcelable

/**
 * @Time 2023/3/6 14:21:20
 * @Description
 **/
data class DeptMode(
    val code: String? = "",
    val create_time: String? = "",
    val create_user: Int? = 0,
    val create_user_name: String? = "",
    val fullname: String? = "",
    val id: Int? = 0,
    val manager_id: Int? = 0,
    val manager_name: String? = "",
    val mark: Int? = 0,
    val name: String? = "",
    val note: String? = "",
    val pid: Int? = 0,
    val sort: Int? = 0,
    val type: Int? = 0,
    val update_time: String? = "",
    val update_user: Int? = 0,
    val update_user_name: String? = ""
)

data class DeptUserMode(
    val address: String? = "",
    val avatar: String? = "",
    val birthday: Int? = 0,
    val city_code: String? = "",
    val city_name: String? = "",
    val create_time: String? = "",
    val create_user: Int? = 0,
    val dept_id: Int? = 0,
    val district_code: String? = "",
    val email: String? = "",
    val gender: Int? = 0,
    val id: Int? = 0,
    val intro: String? = "",
    val is_super_admin: Boolean? = false,
    val level_id: Int? = 0,
    val login_ip: String? = "",
    val login_num: Int? = 0,
    val login_time: Int? = 0,
    val mark: Int? = 0,
    val mobile: String? = "",
    val nickname: String? = "",
    val note: String? = "",
    val password: String? = "",
    val position_id: Int? = 0,
    val province_code: String? = "",
    val realname: String? = "",
    val salt: String? = "",
    val sort: Int? = 0,
    val status: Int? = 0,
    val update_time: String? = "",
    val update_user: Int? = 0,
    val username: String? = ""
):Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readValue(Boolean::class.java.classLoader) as? Boolean,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString(),
        parcel.readValue(Int::class.java.classLoader) as? Int,
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(address)
        parcel.writeString(avatar)
        parcel.writeValue(birthday)
        parcel.writeString(city_code)
        parcel.writeString(city_name)
        parcel.writeString(create_time)
        parcel.writeValue(create_user)
        parcel.writeValue(dept_id)
        parcel.writeString(district_code)
        parcel.writeString(email)
        parcel.writeValue(gender)
        parcel.writeValue(id)
        parcel.writeString(intro)
        parcel.writeValue(is_super_admin)
        parcel.writeValue(level_id)
        parcel.writeString(login_ip)
        parcel.writeValue(login_num)
        parcel.writeValue(login_time)
        parcel.writeValue(mark)
        parcel.writeString(mobile)
        parcel.writeString(nickname)
        parcel.writeString(note)
        parcel.writeString(password)
        parcel.writeValue(position_id)
        parcel.writeString(province_code)
        parcel.writeString(realname)
        parcel.writeString(salt)
        parcel.writeValue(sort)
        parcel.writeValue(status)
        parcel.writeString(update_time)
        parcel.writeValue(update_user)
        parcel.writeString(username)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<DeptUserMode> {
        override fun createFromParcel(parcel: Parcel): DeptUserMode {
            return DeptUserMode(parcel)
        }

        override fun newArray(size: Int): Array<DeptUserMode?> {
            return arrayOfNulls(size)
        }
    }
}
